package com.energy.analysis.sys.shiro.jcaptcha;

import com.octo.captcha.service.image.DefaultManageableImageCaptchaService;

/**提供了判断仓库中是否有相应的验证码存�?
 * ClassName:MyManageableImageCaptchaService <br/>
 * Function: TODO ADD FUNCTION. <br/>
 * Reason: TODO ADD REASON. <br/>
 * Date: 2015�?9�?24�? 下午1:01:14 <br/>
 * 
 * @author fuwei
 * @version V1.0
 * @see
 */
public class MyManageableImageCaptchaService extends DefaultManageableImageCaptchaService {
	public MyManageableImageCaptchaService(com.octo.captcha.service.captchastore.CaptchaStore captchaStore, com.octo.captcha.engine.CaptchaEngine captchaEngine, int minGuarantedStorageDelayInSeconds, int maxCaptchaStoreSize, int captchaStoreLoadBeforeGarbageCollection) {
		super(captchaStore, captchaEngine, minGuarantedStorageDelayInSeconds, maxCaptchaStoreSize, captchaStoreLoadBeforeGarbageCollection);
	}

	public boolean hasCapcha(String id, String userCaptchaResponse) {
		return store.getCaptcha(id).validateResponse(userCaptchaResponse);
	}

}
